/* $Id: bad_user.c,v 1.3 2004/01/04 12:48:19 sby Exp $ */

#include <fcntl.h>
#include <stdio.h>
#include <string.h>

int
bad_user(char* name)
{
   FILE* list;
   char buf[40];

  if ((list = fopen("etc/bad_user", "r")) != NULL)
  {
     while (fgets(buf, 40, list))
     {
        buf[strlen(buf) - 1] = '\0';

        if (!strcmp(buf, name))
           return 1;
     }
     fclose(list);
  }
  return 0;
}

